<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>最新消息</title>
<script src="../public/js/j.js" type="text/javascript"></script>
<script src="../public/js/comment.func.js" type="text/javascript"></script>
<link href="../public/style/admin.css" type="text/css" rel="stylesheet" />
</head>

<body topmargin="30">
<div align="center">
	<table width="100%" id="table1" cellpadding="5" style="border:1px solid #336699;" cellspacing="1">
		<tr>
			<td colspan="2" bgcolor="#E8F1FF">
			<p align="center" style="padding:5px">
			<font size="2">內容管理系統</font></p></td>
		</tr>      
		<form name="form2" method="post" action="?view=newslist&parameter=search">
		<tr style="height:30px">
			<td width="17%" bgcolor="#E8F1FF" align="right">快速搜尋：</td>
			<td width="80%" class="tab_tds" style="text-align:left">
			<input name="namekey" type="text" id="namekey" size="20"> 
			<input type="submit" name="Submit3" value="查 詢">&nbsp;
			<a href="?view=newslist">顯示全部消息</a></td>
		</tr>
		</form>
        <tr style="height:25px">
			<td width="17%" bgcolor="#E8F1FF" align="right">快速新增：</td>
			<td width="80%" class="tab_tds" style="text-align:left"><a href="?view=newsadd&parameter=<?php echo $assArray[1];?>">新增消息</a></td>
		</tr>
	</table>
	
    <table border="1" width="100%" id="table2" cellspacing="1" cellpadding="3" style="border:1px solid #336699;">
    <form name="form" method="post" action="?action=del_archives">
        <tr>
            <td width="8%" class="tab_header_tr">消息ID</td>
            <td width="40%" class="tab_header_tr">消息標題</td>
			<td width="10%" class="tab_header_tr">所屬分類</td>
            <td width="14%" class="tab_header_tr">發布人</td>
            <td width="20%" class="tab_header_tr">發布時間</td>
            <td width="8%" class="tab_header_tr">選擇</td>
        </tr>
<?php
		if(empty($assArray[0])){
?>
			<tr class="tab_tr">
				<td class="tab_tds" height="30" colspan="6">好像還沒有消息!!</td>
			</tr>
<?php
		}else{
			foreach($assArray[0] as $v)
			{
?>
			<tr class="tab_tr">
                <td class="tab_tds"><?php echo $v['aid'];?></td>
                <td class="tab_tds"><a href="?view=newsedit&aid=<?php echo $v['aid'];?>"><?php echo $v['atitle'];?></a> <?php if(!empty($v['state'])){?><span style="color:red">[<?php echo $v['state'];?>]</span><?php }?></td>
				<td class="tab_tds"><a href="?view=newslist&cid=<?php echo $v['cid'];?>"><?php echo $v['cname'];?></a></td>
                <td class="tab_tds"><?php echo $v['author'];?></td>
                <td class="tab_tds"><?php echo date("Y-m-d H:i:s",$v['dateline']);?></td>
                <td class="tab_tds">
                <input name="id[]" type="checkbox" id="id" value="<?php echo $v['aid'];?>" onClick="checkItem(this, 'mmAll')"></td>
            </tr>
<?php
			}
		}
?>
		<tr>
            <td colspan="8" class="tab_tds"><?php echo $assArray[2];?></td>
        </tr>
        <tr>
            <td colspan="8" class="tab_tds">
                <p style="margin-top: 10px; margin-bottom: 10px">	
                <input type="submit" name="Submit" value="刪除所選" onClick="return confirm('您確定真的要刪除嗎？')"> 
                <font size="2">&nbsp; <a href="javascript:;" onclick="selectAll()" style="text-decoration:underline">全選</a> <a href="javascript:;" onclick="conversely()" style="text-decoration:underline">全不選</font></form>	
            </td>
        </tr>
    </table>
</div>
</body>
</html>